package com.itheima.mapper;

import com.itheima.common.entity.QueryPageBean;
import com.itheima.pojo.Setmeal;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface SetmealMapper {
    List<Setmeal> selectByCondition(QueryPageBean queryPageBean);
@Insert("insert into t_setmeal(name,code,helpCode,sex,age,price,remark,attention,img) values(#{name},#{code},#{helpCode},#{sex},#{age},#{price},#{remark},#{attention},#{img})")
    void add(Setmeal setmeal);
@Delete("delete from t_setmeal where id=#{id}")
    void delete(Integer id);
@Select("select * from t_setmeal where id=#{id}")
    Setmeal findById(Integer id);
    @Update("update t_setmeal set code=#{code},name=#{name},helpCode=#{helpCode},sex=#{sex},age=#{age},price=#{price},remark=#{remark},attention=#{attention},img=#{img} where id=#{id}")
    void edit(Setmeal setmeal);
}
